import Mock from 'mockjs'


const data = Mock.mock({
	'tab|5-8': [{
		"title|+1": ['后端', '前端', 'javascript', 'java', 'php', 'css', 'html', 'android', 'IOS'],
		'id': '@id',
		'children|10-30': [{
			'id': '@id',
			'url|0-1': 'https://robohash.org/@id',
			'nickname': '@cname',
			'datetime': '@datetime',
			'title': '@ctitle',
			'desc': '@cword(10,30)',
			'content': '@cword(30, 50)',
			'readed|10-1000': 1,
			'zan|10-1000': 1,
			'isZan': false,
			'mess|10-20': [{
				'url': '@image(20x20, @color)',
				'nickname': '@cname',
				'datetime': '@datetime',
				'content': '@cword(20, 30)'
			}]
		}]
	}]
})

Mock.mock('/api/tab', () => ({ code: 200, data: data.tab }))